home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!news
- From: Bradd W. Szonye <bradds@ix.netcom.com>
- Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.edu
- Subject: RE: ANSI C and POSIX (was Re: C/C++ knocks the crap out of Ada)
- Date: 19 Apr 1996 08:52:38 GMT
- Organization: Netcom
- Message-ID: <01bb2dcd.d9f24720$c6c2b7c7@Zany.localhost>
- References: <JSA.96Feb16135027@organon.com> <dewar.828757752@schonberg> <danpop.828819479@rscernix> <dewar.828879781@schonberg> <4k9qhe$65r@solutions.solon.com> <dewar.828936837@schonberg> <828964950snz@genesis.demon.co.uk> <4kbfup$2vd@news1.mnsinc.com> <4kbl5i$p3@mordred.gatech.edu> <4kbr5q$j1l@mulga.cs.mu.OZ.AU>
- NNTP-Posting-Host: det-mi6-06.ix.netcom.com
- X-NETCOM-Date: Fri Apr 19 3:52:38 AM CDT 1996
- X-Newsreader: Microsoft Internet News
-
-
- On Monday, April 08, 1996, Fergus Henderson wrote...
- > james@amber.biology.gatech.edu (James McIninch) writes:
- >
- > >Szu-Wen Huang (huang@mnsinc.com) wrote:
- > >: Shouldn't true portability mean that even bugs are cross-platform and
- > >: fail reliably? ;)
- > >
- > >No.
- >
- > I strongly disagree -- Szu-Wen Huang is right.
- >
-
- Wrong! As a developer, I *wish* that bugs were reproducible enough to
- actually be portable. Would make the little devils a lot easier to find.
-
- > >When it says "undefined", it means "undefined". There's no way to make
- > >undefined behavior portable, that's why it's undefined.
- >
- > Nope, you've got cause and effect backwards. There's no way to make
- > undefined behavior portable *because* it is undefined. If a language
- > has constructs with undefined behaviour, this will lead to portability
- > problems. But some languages have fewer areas of undefined behaviour
- > than others. Some languages don't have any undefined behaviour at
- > all.
- >
-
- Hmm. I don't know about other languages, but the whole reason things are
- undefined in C/C++ is because all the feuding UNIX and PC developers wrote
- a zillion incompatible libraries that often relied on bizarre side-effects
- and "fallout" behavior. ANSI/ISO made such behavior "undefined" meaning
- that no well-behaved, well-formed, *strictly portable* program would use
- such a thing. That way, compiler vendors could support the undefined
- behavior however they wanted or not at all, to retain maximum
- back-compatibility.
-
- This is in contrast to "implementation-defined" behavior, which means that
- the vendor has to do *something* about the weirdness and document it.
- Undefined stuff can do whatever your compiler vendor wants it to. And it's
- undefined *because* it's not portable, not even to the extent that it may
- or not exist on your machine.
-
- Bradd
-
-
-